﻿<%@ Page Language="C#" MasterPageFile="~/Home/ad/admin.master" AutoEventWireup="true" CodeFile="main.aspx.cs" Inherits="Home_ad_main" Title="Welcome to administator" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<%
    string lg=Request["ad"];
    if (lg == "httt")
    {
     %>
    <table width=100% cellpadding=0 cellspacing=0>
        <tr>
                 &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;
                 &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;
               
                <asp:Label ID="Label3" runat="server" Text="Thông tin về hình thức thanh toán" CssClass="styles30"></asp:Label>
                 
            
        </tr>
        <tr>
            <td>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</td>
        </tr>
         <tr>
            
            <td>
                &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;
            </td>
            <td>
            <asp:Label ID="loi" runat="server" Text="" CssClass="styles30" ForeColor=red></asp:Label>
            <asp:Label ID="tc" runat="server" Text="" CssClass="styles30" ForeColor="#3333ff"></asp:Label>
             </td>
        </tr>
            <tr>
	            <td class="style16" style="width: 40%; height: 22px;">
	            </td>
	            <td class="text" colspan="2" style="height: 22px">
                   
	            </td>
            </tr>
            <tr>
	            <td class="style16" style="width: 33%">
	            <span class="EcataProDetailTitle">Loại thanh toán</span></td>
	            <td class="text" colspan="2">
                    <asp:TextBox ID="txttt" runat="server" style="border: 1px solid #D8E5F6" Width="180px" MaxLength="100"></asp:TextBox>
	            </td>
            </tr>
            
            <tr>
                <td></td><td>
                    <br />
                </td>
            </tr>
      <tr>
          <td class="style16" style="width: 189px; height: 30px">
          </td>
          <td class="text" colspan="2">
              &nbsp; &nbsp;
              <asp:Button ID="Bt_thanhtoan" runat="server" Text="Thêm mới" OnClick="Bt_thanhtoan_Click" />
      </tr>
        </table><br />
        <table width=100% cellpadding=0 cellspacing=0>
            <tr>
                <td width=20%></td>
                <td>
                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="sql_tt" Width="359px">
                    <Columns>
                        <asp:BoundField DataField="ID" HeaderText="M&#227;" InsertVisible="False" ReadOnly="True"
                            SortExpression="ID" />
                        <asp:BoundField DataField="HTTT" HeaderText="Loại thanh to&#225;n" SortExpression="HTTT" />
                        <asp:CommandField ButtonType="Button" CancelText="[Hủy bỏ]" EditText="[Sửa]" ShowEditButton="True"
                            UpdateText="[Cập nhật]" >
                            <ControlStyle Width="70px" />
                        </asp:CommandField>
                        <asp:CommandField ButtonType="Button" DeleteText="[X&#243;a]" ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="sql_tt" runat="server" ConnectionString="<%$ ConnectionStrings:db_connection %>"
                    DeleteCommand="DELETE FROM [TT001] WHERE [ID] = @ID" InsertCommand="INSERT INTO [TT001] ([HTTT]) VALUES (@HTTT)"
                    SelectCommand="SELECT * FROM [TT001] ORDER BY [HTTT]" UpdateCommand="UPDATE [TT001] SET [HTTT] = @HTTT WHERE [ID] = @ID">
                    <DeleteParameters>
                        <asp:Parameter Name="ID" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="HTTT" Type="String" />
                        <asp:Parameter Name="ID" Type="Int32" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="HTTT" Type="String" />
                    </InsertParameters>
                </asp:SqlDataSource>

                </td>
                <td></td>
            </tr>
        </table>
     <%} %>
    </asp:Content>

